import multiprocessing as mp
import time
def hashaki(l,i):
    l.acquire()
    print("hashaki",i)
    time.sleep(1)
    l.release()

if __name__=='__main__':
    lock=mp.Lock()
    i=0
    # 如果直接运行，直接死机。。。。
    while 1: 
        mp.Process(target=hashaki,args=(lock,i)).start()
        i+=1